package settings;

import java.io.*;
import java.util.*;

/**
 * Represents the Insim running configurations.
 * @author BDS
 */
public class Settings implements Serializable
{
	private static final long serialVersionUID = 1L;

	private List<Environment> environments;

	/**
	 * Class constructor.
	 */
	public Settings()
	{
		environments = new ArrayList<Environment>();
	}
	
	/**
	 * Returns the hash code.
	 * @return The hash code.
	 */
	@Override
	public int hashCode()
	{
		int hashCode = 23;
		
	    for (Environment environment : environments)
	    {
	    	 hashCode = hashCode * 37 + environment.hashCode();
	    }
	    
	    return hashCode;
	}
	
	/**
	 * Getter for the Environment collection.
	 * @return The Environment collection.
	 */
	public List<Environment> getEnvironments() { return environments; }

	/**
	 * Setter for the Environment collection.
	 * @param environments The Environment collection.
	 */
	public void setEnvironments(List<Environment> environments) { this.environments = environments; }
}
